/* test_copy.cc
* This file is part of ncursesxx library
* Copyright (c) 2003,2004 by Stanislav Ievlev
*
* This file is covered by the GNU Library General Public License,
* which should be included with libncursesxx as the file COPYING.
*/
#include <unistd.h>

#include <ncurses/application.hh>
#include <ncurses/panel.hh>
#include <ncurses/pen.hh>

int
main()
{
	ncurses::application	app;
	ncurses::panel	win,win2;
	ncurses::pen	pen(win),pen2(win2);

	win.resize(30, 10);
	pen.frame();
	pen.move(1, 1);
	pen.write("press enter to copy...");

	win2.resize(31,11);
	pen2.frame();
	win2.move(40,0);
	
	
	win.show();
	win2.show();

	::update_panels();
	::doupdate();
	
	::wgetch(::stdscr);

	ncurses::copy(win,win2);
	
	::wrefresh(::stdscr); //made first screen refresh
	pen2.commit();
	::doupdate();

	::wgetch(::stdscr);
}
